import {
  Navigator,
  WindowSet,
  Message,
  Validate
} from '../index'
// import './../../utils/rem.js'
import '../../css/layout.css' /*引入公共样式*/
import api from '../services/api' // 导入api接口
import {getQuery} from '@/utils/utils'
import md5 from 'js-md5';
export default (Vue) => {
    // 如果是非线上环境，不加载 VConsole
    if (process.env.NODE_ENV !== 'production' || getQuery('dev') == 'true') {
        var VConsole = require('vconsole/dist/vconsole.min.js');
        var vConsole = new VConsole();
        Vue.config.performance = true;
    }
    Vue.$openRouter = Vue.prototype.$openRouter = Navigator.openRouter;
    Vue.$setTitle = Vue.prototype.$setTitle = WindowSet.setTtitle;
    Vue.$alertTip = Vue.prototype.$alertTip = Message.installMessage;
    Vue.$validate = Vue.prototype.$validate = Validate;
    Vue.$md5 = Vue.prototype.$md5 = md5;
    Vue.$api = Vue.prototype.$api = api; // 将api挂载到vue的原型上
}